<template>
	<view class="contact">
		<web-view :src="src" bindmessage="handleGetMessage"></web-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				src:''
			}
		},
		onLoad(options) {
			// console.log('options.url',options.url)
			this.src = decodeURIComponent(options.url)
		},
		onShow(){
			
		},
		methods: {
			handleGetMessage:function(e){
			  console.log('handleGetMessage',e)
			  if(e.detail.data[0].result=='success'){
				uni.$emit('resetNewestInfo',{from:'esign'});
				uni.switchTab({
					url:'/pages/lease/index'
				})
			  }
			},
			// 刷脸完成后重新加载实名页面
			reloadPage(redirectUrl) {
			  console.log('---webview reloadPage', redirectUrl)
			  this.src = redirectUrl;
			},
			// 打开页面
			openPage(url){
				uni.navigateTo({
					url: url
				})
			},
		}
	}
</script>
<style lang="scss">
	page {
		background-color: #F4F4F4;
	}
</style>
<style lang="scss" scoped>

</style>
